﻿<UserControl x:Class="Example.Frontend.Customers.CustomersView"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"  
      >
    <DockPanel>
        <DockPanel Width="200">
            <StackPanel DockPanel.Dock="Bottom" Name="bottomStack" Orientation="Horizontal">
                <Button x:Name="AddCustomer" Margin="2" Padding="3" >Add</Button>
                <Button x:Name="EditCustomer" Margin="2" Padding="3">Edit</Button>
                <Button x:Name="DeleteCustomer" Margin="2" Padding="3" >Remove</Button>                
            </StackPanel>

            <DataGrid Margin="4" ItemsSource="{Binding Customers}" SelectedItem="{Binding SelectedCustomer, Mode=TwoWay}" CanUserReorderColumns="False"
                      AlternatingRowBackground="#FFE5E5E5" CanUserResizeRows="False" RowBackground="White" IsTextSearchEnabled="True"
                      IsTextSearchCaseSensitive="True" IsTabStop="True" CanUserDeleteRows="False" CanUserAddRows="False"
                      AutoGenerateColumns="False" HeadersVisibility="Column" HorizontalScrollBarVisibility="Disabled" SelectionMode="Single">
                <DataGrid.Columns>
                    <DataGridTextColumn  Header="Name" Binding="{Binding Name}" MinWidth="70"  Width="*" IsReadOnly="True" />
                    <DataGridTextColumn  Header="Surname" Binding="{Binding Surname}" MinWidth="70" Width="*" IsReadOnly="True" />
                    <DataGridTextColumn  Header="BirthDate" Binding="{Binding BirthDate}" MinWidth="70" Width="*" IsReadOnly="True" />
                </DataGrid.Columns>
            </DataGrid>
        </DockPanel>        
        <TabControl x:Name="Items" />
    </DockPanel>
</UserControl>